package com.s69.ssm.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

public class Student implements Serializable {

    private Integer id;
    private String stuno;
    private String realname;
    private Integer sex;
    private String description;
    private String faceimg;
    private Integer classId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date admissionDate;
    private String phone;
    private String idcardPositive;
    private String idcardNegative;


    private String className;
    private String skillNames;

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getSkillNames() {
        return skillNames;
    }

    public void setSkillNames(String skillNames) {
        this.skillNames = skillNames;
    }

    private StuClass stuClass;
    private List<Skill> skills;

    public Student() {
    }

    public Student(Integer id, String stuno, String realname, Integer sex, String description, String faceimg, Integer classId, Date admissionDate, String phone, String idcardPositive, String idcardNegative, StuClass stuClass, List<Skill> skills) {
        this.id = id;
        this.stuno = stuno;
        this.realname = realname;
        this.sex = sex;
        this.description = description;
        this.faceimg = faceimg;
        this.classId = classId;
        this.admissionDate = admissionDate;
        this.phone = phone;
        this.idcardPositive = idcardPositive;
        this.idcardNegative = idcardNegative;
        this.stuClass = stuClass;
        this.skills = skills;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getStuno() {
        return stuno;
    }

    public void setStuno(String stuno) {
        this.stuno = stuno;
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public Integer getSex() {
        return sex;
    }

    public void setSex(Integer sex) {
        this.sex = sex;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getFaceimg() {
        return faceimg;
    }

    public void setFaceimg(String faceimg) {
        this.faceimg = faceimg;
    }

    public Integer getClassId() {
        return classId;
    }

    public void setClassId(Integer classId) {
        this.classId = classId;
    }

    public Date getAdmissionDate() {
        return admissionDate;
    }

    public void setAdmissionDate(Date admissionDate) {
        this.admissionDate = admissionDate;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getIdcardPositive() {
        return idcardPositive;
    }

    public void setIdcardPositive(String idcardPositive) {
        this.idcardPositive = idcardPositive;
    }

    public String getIdcardNegative() {
        return idcardNegative;
    }

    public void setIdcardNegative(String idcardNegative) {
        this.idcardNegative = idcardNegative;
    }

    public StuClass getStuClass() {
        return stuClass;
    }

    public void setStuClass(StuClass stuClass) {
        this.stuClass = stuClass;
    }

    public List<Skill> getSkills() {
        return skills;
    }

    public void setSkills(List<Skill> skills) {
        this.skills = skills;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", stuno='" + stuno + '\'' +
                ", realname='" + realname + '\'' +
                ", sex=" + sex +
                ", description='" + description + '\'' +
                ", faceimg='" + faceimg + '\'' +
                ", classId=" + classId +
                ", admissionDate=" + admissionDate +
                ", phone='" + phone + '\'' +
                ", idcardPositive='" + idcardPositive + '\'' +
                ", idcardNegative='" + idcardNegative + '\'' +
                ", stuClass=" + stuClass +
                ", skills=" + skills +
                '}';
    }

}
